package com.bs.service;

import com.bs.domain.Cluster;
import com.bs.repository.ClusterRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by wenguangjia on 2017/8/31.
 */
@Service
public class ClusterService {
    @Autowired
    private ClusterRepository clusterRepository;

    public List<Cluster> findAll(){
        return clusterRepository.findAll();
    }

    public Cluster save(Cluster cluster){

        return clusterRepository.save(cluster);
    }

    public void delete(Long id){
        clusterRepository.delete(id);
    }
}
